package com.ruoyi.model.auth;

import com.ruoyi.model.user.UserInfo;

/**
 * @author : 张怀秋
 * ThreadLocal工具类
 **/
public class AuthContextHolder {
    //会员用户id
    private static ThreadLocal<String> userId = new ThreadLocal<>();
    private static ThreadLocal<UserInfo> userInfo = new ThreadLocal<>();

    public static String getUserId() {
        return userId.get();
    }

    public static void setUserId(String _userId) {
        userId.set(_userId);
    }

    public static UserInfo getUserInfo() {
        return userInfo.get();
    }

    public static void setUserInfo(UserInfo _userInfo) {
        userInfo.set(_userInfo);
    }

}
